{% extends "base.html" %}

{% block left %}
  <div id="asset_search_form" class="clearfix">
    <input class="search_input" name="search"/>
    <button class="search_btn">Search</button>
    
    <div style="margin: 8px 0">
      <span style="font-weight: bold">Tags:</span>
      <div style="height: 130px; overflow: auto;">
        
        {% regroup tags by category as tags_list %}
        {% for category in tags_list %}
          <div style="margin: 8px 0">
            <span style="font-weight: bold">{{ category.grouper }}</span>
            {% for tag in category.list %}
              <div><input type="checkbox" name="tags" value="{{ tag.id }}" />{{ tag.type }}</div>
            {% endfor %}
          </div>
        {% endfor %}
      </div>
    </div>
    
    <div style="margin: 8px 0">
      <span style="font-weight: bold">Formats:</span>
      <div style="height: 130px; overflow: auto;">
        {% for format in formats %}
          <div><input type="checkbox" name="formats" value="{{ format.id }}" />{{ format.name }}</div>
        {% endfor %}
      </div>
    </div>
    
  </div>
{% endblock %}

{% block right %}
	<div class="search_results"></div>
  
  {% for asset in assets %}
    {% include "snippets/smallpreview.html" with asset=asset only %}
  {% empty %}
    No assets
  {% endfor%}

{% endblock %}
